package com.example.passwordmanager.Listener;

import android.view.View;

public abstract class FdOnClickListener implements View.OnClickListener {
    Long lastTime;
    int time;

    public FdOnClickListener() {
    }

    public FdOnClickListener(int time) {
        this.time = time;
    }

    @Override
    public final void onClick(View v) {
        if (System.currentTimeMillis() > time + lastTime) {
            click(v);
            lastTime=System.currentTimeMillis();
        }
    }


    public abstract void click(View v);
}
